//
//  AlbumPhotoCell.h
//  OntheRoadV4
//
//  Created by ZhangYanhua on 14/11/26.
//  Copyright (c) 2014年 EricHuang. All rights reserved.
//

#import <UIKit/UIKit.h>

@class AlbumPhotoCell;

@protocol AlbumPhotoCellDelegate <NSObject>

- (void)albumPhotoCell:(AlbumPhotoCell *)cell didSelectAssetAtIndex:(NSInteger)index;
- (void)albumPhotoCell:(AlbumPhotoCell *)cell didSelectImageAtIndex:(NSInteger)index;

@end

@interface AlbumPhotoCell : UITableViewCell

@property (weak, nonatomic) id<AlbumPhotoCellDelegate> delegate;

@property (nonatomic, strong) NSArray *imageViews;
@property (nonatomic, strong) NSArray *selectBtns;
@property (nonatomic, strong) NSArray *overlayViews;
@property (nonatomic, strong) NSArray *videoIcons;
@property (nonatomic, strong) NSArray *videoLabels;
@property (nonatomic, strong) NSArray *videoShadows;

@property (weak, nonatomic) IBOutlet UIImageView *imageView1;
@property (weak, nonatomic) IBOutlet UIImageView *imageView2;
@property (weak, nonatomic) IBOutlet UIImageView *imageView3;
@property (weak, nonatomic) IBOutlet UIImageView *imageView4;

@property (weak, nonatomic) IBOutlet UIButton *selectBtn1;
@property (weak, nonatomic) IBOutlet UIButton *selectBtn2;
@property (weak, nonatomic) IBOutlet UIButton *selectBtn3;
@property (weak, nonatomic) IBOutlet UIButton *selectBtn4;

@property (weak, nonatomic) IBOutlet UIView *overlayView1;
@property (weak, nonatomic) IBOutlet UIView *overlayView2;
@property (weak, nonatomic) IBOutlet UIView *overlayView3;
@property (weak, nonatomic) IBOutlet UIView *overlayView4;

@property (weak, nonatomic) IBOutlet UIImageView *videoIcon1;
@property (weak, nonatomic) IBOutlet UIImageView *videoIcon2;
@property (weak, nonatomic) IBOutlet UIImageView *videoIcon3;
@property (weak, nonatomic) IBOutlet UIImageView *videoIcon4;

@property (weak, nonatomic) IBOutlet UIImageView *videoShadowImgView1;
@property (weak, nonatomic) IBOutlet UIImageView *videoShadowImgView2;
@property (weak, nonatomic) IBOutlet UIImageView *videoShadowImgView3;
@property (weak, nonatomic) IBOutlet UIImageView *videoShadowImgView4;

@property (weak, nonatomic) IBOutlet UILabel *videoDurationLabel1;
@property (weak, nonatomic) IBOutlet UILabel *videoDurationLabel2;
@property (weak, nonatomic) IBOutlet UILabel *videoDurationLabel3;
@property (weak, nonatomic) IBOutlet UILabel *videoDurationLabel4;

@property (weak, nonatomic) IBOutlet UIImageView *cameraMaskImgView;

+ (CGFloat)getCellHeightIsLastCell:(BOOL)isLastCell
                   numberOfColumns:(NSInteger)cols;

- (void)updateCellContentWithArray:(NSArray *)assetArray selectedArray:(NSArray *)selectedArray;

- (void)updateCellSelectionState:(BOOL)isSelected AtIndex:(NSInteger)index;

@end
